package com.pj.hellomvvm.manager

import com.pj.hellomvvm.R
import com.pj.hellomvvm.entity.TitleIconData
import javax.inject.Inject
import javax.inject.Singleton

@Singleton
class DataManager @Inject constructor() {
    val widgetItemData: MutableList<TitleIconData> = mutableListOf()
    val otherItemData: MutableList<TitleIconData> = mutableListOf()

    init {
        initWidgetItems()
        initOtherItems()
    }

    private fun initWidgetItems() {
        widgetItemData.add(TitleIconData("Button", R.mipmap.icon_grid_button))
        widgetItemData.add(TitleIconData("PullRefreshLoadLayout", R.mipmap.icon_grid_pull_layout))
        widgetItemData.add(TitleIconData("Dialog", R.mipmap.icon_grid_dialog))
        widgetItemData.add(TitleIconData("FloatLayout", R.mipmap.icon_grid_float_layout))
        widgetItemData.add(TitleIconData("EmptyView", R.mipmap.icon_grid_empty_view))
    }

    private fun initOtherItems() {
        otherItemData.add(TitleIconData("MMKV", R.drawable.ic_other_mmkv))
        otherItemData.add(TitleIconData("摄像头信息", R.drawable.ic_baseline_camera_alt_24))
    }
}